package com.bite.messageQueue.common;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class QueueDeclareArguments extends BasicArguments implements Serializable {
    //表示队列的标识
    private String name;
    //表示队列是否持久化
    private boolean durable;
    //为true时表示这个队列只能被一个消费者消费（独有）
    private boolean exclusive;
    //自动删除
    private boolean autoDelete;
    //表示扩展参数
    private Map<String, Object> arguments;

    public QueueDeclareArguments() {
    }

    public QueueDeclareArguments(String name, boolean durable, boolean exclusive, boolean autoDelete, Map<String, Object> arguments) {
        this.name = name;
        this.durable = durable;
        this.exclusive = exclusive;
        this.autoDelete = autoDelete;
        this.arguments = arguments;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return durable
     */
    public boolean isDurable() {
        return durable;
    }

    /**
     * 设置
     * @param durable
     */
    public void setDurable(boolean durable) {
        this.durable = durable;
    }

    /**
     * 获取
     * @return exclusive
     */
    public boolean isExclusive() {
        return exclusive;
    }

    /**
     * 设置
     * @param exclusive
     */
    public void setExclusive(boolean exclusive) {
        this.exclusive = exclusive;
    }

    /**
     * 获取
     * @return autoDelete
     */
    public boolean isAutoDelete() {
        return autoDelete;
    }

    /**
     * 设置
     * @param autoDelete
     */
    public void setAutoDelete(boolean autoDelete) {
        this.autoDelete = autoDelete;
    }

    /**
     * 获取
     * @return arguments
     */
    public Map<String, Object> getArguments() {
        return arguments;
    }

    /**
     * 设置
     * @param arguments
     */
    public void setArguments(Map<String, Object> arguments) {
        this.arguments = arguments;
    }

    public String toString() {
        return "QueueDeclareArguments{name = " + name + ", durable = " + durable + ", exclusive = " + exclusive + ", autoDelete = " + autoDelete + ", arguments = " + arguments + "}";
    }
}
